package com.parking.common.core.model;

import java.math.BigDecimal;

public class StateData {
    /**
     *  用户车辆状态（1，使用  2，删除）
     */
    public static final Integer USER_CAR_STATE=1;
    public static final Integer USER_CAR_STATE_DELETE=2;

    /**
     * 用户实名状态(0：未实名，1：已实名)
     */
    public static final Integer USER_REALNAME_STATE=1;
    public static final Integer USER_REALNAME_STATE_ISNOT=0;
    /**
     * 用户日志登录状态：0 未登录 1已登录
     *  userLogs
     * */
    public static final Integer USER_LOGS_LOGIN=0;
    public static final Integer USER_LOGS_ISNOT_LOGIN=1;
    /**
     * 用户账号登录状态：0，禁用  1，启用  2，删除
     *  user
     * */
    public static final Integer USER_STATE_DISABLE =0;
    public static final Integer USER_STATE_ENABLE =1;
    public static final Integer USER_STATE_DELETE =2;
    /**
     * 平台账号登录状态：0，禁用  1，启用  2，删除
     *  platform
     * */
    public static final Integer PLATFORM_STATE_DISABLE =0;
    public static final Integer PLATFORM_STATE_ENABLE =1;
    public static final Integer PLATFORM_STATE_DELETE =2;

    /**
     * 平台角色状态：0，禁用  1，启用  2，删除
     *  platform
     * */
    public static final Integer PLATFORM_ROLE_STATE_DISABLE =0;
    public static final Integer PLATFORM_ROLE_STATE_ENABLE =1;
    public static final Integer PLATFORM_ROLE_STATE_DELETE =2;
    /**
     * 用户日志登录状态：0 未登录 1已登录
     *  userLogs
     * */
    public static final Integer PLATFORM_LOGS_LOGIN=0;
    public static final Integer PLATFORM_LOGS_ISNOT_LOGIN=1;



    /**
     * 出租客账号登录状态：0，禁用  1，启用  2，删除
     *  renders
     * */
    public static final Integer RENDERS_STATE_DISABLE =0;
    public static final Integer RENDERS_STATE_ENABLE =1;
    public static final Integer RENDERS_STATE_DELETE =2;
    /**
     * 出租客日志登录状态：0 未登录 1已登录
     *  userLogs
     * */
    public static final Integer RENTERS_LOGS_LOGIN=0;
    public static final Integer RENTERS_LOGS_ISNOT_LOGIN=1;
    /**
     * 出租客实名认证状态（0：未实名，1：已实名）
     */
    public static final Integer RENTERS_REAL_NAME_STATE_NO=0;
    public static final Integer RENTERS_REAL_NAME_STATE_YES=1;

    /**
     * 物业账号登录状态：0，禁用  1，启用  2，删除
     *  certified
     * */
    public static final Integer CERTIFIED_STATE_DISABLE =0;
    public static final Integer CERTIFIED_STATE_ENABLE =1;
    public static final Integer CERTIFIED_STATE_DELETE =2;
    /**
     * 订单状态：0待支付 1已支付 2可开始 3已开始 4需结束 5已结束 6已取消
     *  order
     * */
    public static final Integer ORDER_STATE_NO_PAID = 0;
    public static final Integer ORDER_STATE_IS_PAID = 1;
    public static final Integer ORDER_STATE_CAN_BEGIN = 2;
    public static final Integer ORDER_STATE_BEGIN = 3;
    public static final Integer ORDER_STATE_SHOULD_END = 4;
    public static final Integer ORDER_STATE_END = 5;
    public static final Integer ORDER_STATE_CANCELED = 6;
    /**
     * 车位上下架状态(0：下架，1：上架)
     *  stall
     * */
    public static final Integer STALL_STATE_DOWN = 0;
    public static final Integer STALL_STATE_UP = 1;
    /**
     * 用户的物业订单
     * 物业 平台双方分成比例
     * certified platform
     * */
    public static final BigDecimal ORDER_RATE_CERTIFIED = new BigDecimal("0.5");
    public static final BigDecimal ORDER_RATE_PLATFORM_FROM_CERTIFIED = new BigDecimal("0.5");
    /**
     * 用户的出租客订单
     * 平台 出租客双方分成比例
     * platform renters
     * */
    public static final BigDecimal ORDER_RATE_RENTERS = new BigDecimal("0.5");
    public static final BigDecimal ORDER_RATE_PLATFORM_FROM_RENTERS = new BigDecimal("0.5");
    /**
     * 用户订单
     * 开始前半小时内退单的退款比例
     * 例 订单4元 退款比例0.3 则退款4*0.3=1.2元
     * */
    public static final BigDecimal ORDER_REFUND_RATE_PENALTY = new BigDecimal("0.5");
    /**
     * 雪花算法订单编号的长度
     * */
    public static final Integer ORDER_NUM_LENGTH_SNOWFLAKE = 19;
    public static final Integer ORDER_NUM_OVERTIME_LENGTH_SNOWFLAKE = 20;
    /**
     * 订单类型
     * 普通订单-支付 普通订单-退款 超时订单
     * */
    public static final Integer ORDER_TYPE_NORMAL_PAY = 0;
    public static final Integer ORDER_TYPE_NORMAL_REFUND = 1;
    public static final Integer ORDER_TYPE_OVERTIME = 2;
    /**
     * 订单日志操作人类型
     * 0系统自动 1用户 2物业
     */
    public static final Integer ORDER_LOG_PERSON_TYPE_SYSTEM = 0;
    public static final Integer ORDER_LOG_PERSON_TYPE_USER = 1;
    public static final Integer ORDER_LOG_PERSON_TYPE_CERTIFIED = 2;
    /**
     * 订单状态转化对应接口类型
     * 待支付->支付 0 支付宝主动回调 1 消息队列查询支付状态 2 用户主动退单
     */
    public static final Integer ORDER_STATE_NOPAY_TO_PAID_ALIPAY = 0;
    public static final Integer ORDER_STATE_NOPAY_TO_PAID_RABBITMQ = 1;

    public static final Integer ORDER_STATE_NOPAY_TO_PAID_USER = 2;

    /**
     * 订单状态转化对应接口类型
     * 待支付->可开始 0 支付宝主动回调 1 消息队列查询支付状态 2 用户主动退单
     */
    public static final Integer ORDER_STATE_NOPAY_TO_SHBEGIN_ALIPAY = 0;
    public static final Integer ORDER_STATE_NOPAY_TO_SHBEGIN_RABBITMQ = 1;

    public static final Integer ORDER_STATE_NOPAY_TO_SHBEGIN_USER = 2;

    /**
     * 物业和出租客的身份(0:出租客,1:物业)
     *
     * */
    public static final Integer ROLE_STATE_RENTERS=0;
    public static final Integer ROLE_STATE_CERTIFIED=1;
    /**
     * 物业日志登录状态：0 未登录 1已登录
     *
     *  userLogs
     * */
    public static final Integer CERTIFIED_LOGS_LOGIN=0;
    public static final Integer CERTIFIED_LOGS_ISNOT_LOGIN=1;

    /**
     * 出租客车位审核状态：0已申请，1通过，2退回
     */
    public static final Integer RENTERS_CHECK_WAIT=0;
    public static final Integer RENTERS_CHECK_PASS=1;
    public static final Integer RENTERS_CHECK_NO_PASS=2;
    /**
     * 车位是否存在出租计划 1无出租计划 0有出租计划
     */
    public static final Integer STALL_IS_PLAN = 0;
    public static final Integer STALL_IS_NOT_PLAN = 1;
    /**
     * 车位类型 0普通车位 1充电车位
     */
    public static final Integer STALL_TYPE_NORMAL = 0;
    public static final Integer STALL_TYPE_CHARGE = 1;
    /**
     * 是否超时 0未超时 1超时未支付 2超时已支付
     * */
    public static final Integer ORDER_IS_NOT_OVERTIME = 0;
    public static final Integer ORDER_IS_OVERTIME_NOT_FINISH = 1;
    public static final Integer ORDER_IS_OVERTIME_FINISH = 2;
    /**
     * 超时订单是否支付 0未支付 1支付
     * */
    public static final Integer ORDER_OVERTIME_NOT_PAY = 0;
    public static final Integer ORDER_OVERTIME_PAID = 1;

    /**
     * 是否评论 0未评论 1未回复 2已回复
     * */
    public static final Integer ORDER_IS_NOT_COMMENT = 0;
    public static final Integer ORDER_IS_COMMENT_NO_REPLY = 1;
    public static final Integer ORDER_IS_REPLY = 2;
    /**
     * 评论查询条件 0无回复 1有回复
     * */
    public static final Integer COMMENT_NO_REPLY = 0;
    public static final Integer COMMENT_IS_REPLY = 1;
    /**
     * 收入类型 0普通订单 1取消订单 2超时订单
     * */
    public static final Integer ORDER_MONEY_TYPE_ADD_ORDER = 0;
    public static final Integer ORDER_MONEY_TYPE_DELETE_ORDER = 1;
    public static final Integer ORDER_MONEY_TYPE_OVERTIME_ORDER = 2;

    /**
     * 一级菜单标志
     * */
    public static final Integer PLATFORM_RESOURCE_ID=0;

    /**
     * 订单完成后不回复则自动好评的天数
     * */
    public static final Integer AUTOMATIC_COMMENT_LENGTH_DAY = 7;
    /**
     * 计算物业评分时统计订单的天数
     * */
    public static final Integer CERTIFIED_SCORE_LENGTH_DAY = 30;
    /**
     * 订单评论种类与得分 差评=1分 中评=3分 好评=5分
     * */
    public static final Integer COMMENT_SCORE_BAD = 1;
    public static final Integer COMMENT_SCORE_OK = 3;
    public static final Integer COMMENT_SCORE_GOOD = 5;
    /**
     * 车位归属：0、出租客，1、物业
     */
    public static final Integer STALL_IS_RENTERS=0;
    public static final Integer STALL_IS_CERTIFIED=1;
    /**
     * 查询用订单状态 0预定订单 1正在进行 2超时订单 3取消订单 4已完成
     * */
    public static final Integer ORDER_STATE_SEARCH_PRE = 0;
    public static final Integer ORDER_STATE_SEARCH_ING = 1;
    public static final Integer ORDER_STATE_SEARCH_OVERTIME = 2;
    public static final Integer ORDER_STATE_SEARCH_CANCEL = 3;
    public static final Integer ORDER_STATE_SEARCH_FINISH = 4;
    /**
     * 更多查询用订单状态 0预定订单 -> 0未支付 1已支付
     *                 1正在进行 -> 0未入场 1已入场
     *                 2超时订单 -> 0未出场 1未支付
     *                 3取消订单 -> 0手动取消 1超时取消
     *                 4完成订单 -> 0未评论 1好中评 2差评 (出租客 平台)
     *                          // 0未评论 1未回复 2已回复 (用户)
     *                          // 0未评论 1好中评 2差评未回复 3差评已回复(物业)
     * */
    public static final Integer ORDER_STATE_FURTHER_PRE_NO_PAY = 0;
    public static final Integer ORDER_STATE_FURTHER_PRE_PAID = 1;
    public static final Integer ORDER_STATE_FURTHER_ING_NO_COME = 0;
    public static final Integer ORDER_STATE_FURTHER_ING_COME = 1;
    public static final Integer ORDER_STATE_FURTHER_OVERTIME_NOT_OUT = 0;
    public static final Integer ORDER_STATE_FURTHER_OVERTIME_NOT_PAY = 1;
    public static final Integer ORDER_STATE_FURTHER_CANCEL_NOPAY = 0;
    public static final Integer ORDER_STATE_FURTHER_CANCEL_USER = 1;
    public static final Integer ORDER_STATE_FURTHER_CANCEL_AUTO = 2;
    public static final Integer ORDER_STATE_FURTHER_FINISH_NO_COMMENT = 0;
    public static final Integer ORDER_STATE_FURTHER_FINISH_GOOD_OR_OK = 1; // 出租客 平台 物业
    public static final Integer ORDER_STATE_FURTHER_FINISH_NO_REPLY = 1; // 用户
    public static final Integer ORDER_STATE_FURTHER_FINISH_BAD = 2; // 出租客 平台
    public static final Integer ORDER_STATE_FURTHER_FINISH_REPLIED = 2; // 用户
    public static final Integer ORDER_STATE_FURTHER_FINISH_BAD_NO_REPLY = 2; // 物业
    public static final Integer ORDER_STATE_FURTHER_FINISH_BAD_REPLIED = 3;
    /**
     * 取消方式 0未支付系统取消 1用户取消 2车位超时取消
     * */
    public static final Integer ORDER_STATE_CANCEL_BY_SYSTEM = 0;
    public static final Integer ORDER_STATE_CANCEL_BY_USER = 1;
    public static final Integer ORDER_STATE_IS_AUTO_CANCEL = 2;

    /**
     * 超时订单编号与普通订单编号互转
     * */
    public static String fromOrderNumToOvertime(String orderNum){
        return "1"+orderNum;
    }
    public static String fromOvertimeNumToOrder(String overtimeNum){
        return overtimeNum.substring(1);
    }

    /**
     * 支付宝回调URL前半部分
     * */
    public static String PAY_NOTIFY_URL_PRE = "http://k3gxeu.natappfree.cc";

    /**
     * 是否出场 0已出场 1未出场
     * */
    public static Integer ENTRANCE_INFO_IS_OUT = 0;
    public static Integer ENTRANCE_INFO_IS_NOT_OUT = 1;
}
